{extend name="base"/}
{block name="css"}
<link rel="stylesheet" href="__ADMIN__/css/classgoods.css">
<style>
    input::-webkit-outer-spin-button,
    input::-webkit-inner-spin-button{
        -webkit-appearance: none !important;
        margin: 0; 
    }
    input[type="number"]{-moz-appearance:textfield;}
</style>
{/block}
{block name="content"}

<ul>
    <li class="shop_ment">
            <div>会员申请店铺需要满足的条件</div>
            <p>GMOD大于等于 <input type="number" name="integral" min="0" value=""></p><p>GMOB大于等于 <input type="number" name="money" value="" min="0"></p>
            <button>确 定</button>
        </li>
        
        <li class="shop_ment">
            <div>会员申请店铺扣除</div>
            <p>GMOD扣除 <input type="number" name="deduction_integral" min="0" value="" ></p><p>GMOB扣除 <input type="number" name="deduction_money" min="0" value=""></p><p>平台扣除交易手续费 <input type="number" value="" min="0" name="poundage"> % 每笔交易均扣除，商家到账为，扣除手续费后的数量。</p>
            <button>确 定</button>
        </li>
        
        <li class="shop_ment">
            <div style="width: 100px;">GMOD数量</div>
            <p>会员购物/交易时，平台返给会员的GMOD数量 <input type="number" value="" min="0" name="platform_giveintegral"> %</p><p>商家额外赠送给会员的GMOD数量 <input type="number" value="" min="0" name="seller_giveintegral"> %</p>
            <button>确 定</button>
        </li>
        
        <li class="shop_ment">
            <div style="width: 100px;">GMOB/GMOD比例</div>
            <p>商家收到的GMOB比例是 <input type="number" value="" min="0" name="seller_getmoney"> %</p><p>商家收到的GMOD比例是 <input type="number" value="" min="0" name="seller_getintegral"> %</p>
            <button>确 定</button>
        </li>
</ul>


{/block}
{block name="js"}
<script>
    $("button").click(function(){
        //var arr=[];
       // var names=[];
        var arrs=[];
        var Oindex=$(this).parent().index();
        var indexs=$("li").eq(Oindex).children("p").children("input").length;
        for(var i=0;i<$("li").eq(Oindex).children("p").children("input").length;i++){
            var Oval=$("li").eq(Oindex).children("p").children("input").eq(i).val();
            var Ovals=parseInt(Oval);
           // arr.push(Ovals);
            var Oname=$("li").eq(Oindex).children("p").children("input").eq(i).attr("name");
          //  names.push(Oname);
            arrs.push({name:Oname,num:Oval});
        }
        $.ajax({
                    url: '/admin/ShopConfig/shopment',
                    type: 'POST',
                    data: arrs,
                    processData: false, // jQuery不要去处理发送的数据
                    contentType: false, // jQuery不要去设置Content-Type请求头
                    success: function(res) {
                        console.log(res);
                        if(res.code==1){
                            

                        }else{
                            
                        }
                    }

                });
    });
    
</script>
{/block}